.class public Les/qd0;
.super Ljava/lang/Object;
.source "Session.java"


# instance fields
.field private a:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map<",
            "Ljava/lang/String;",
            "Les/wd0;",
            ">;"
        }
    .end annotation
.end field

.field b:J

.field private c:Lcom/hierynomus/smbj/connection/a;

.field private d:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map<",
            "Ljava/lang/Long;",
            "Les/xd0;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(JLcom/hierynomus/smbj/connection/a;)V
    .locals 1

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    new-instance v0, Ljava/util/concurrent/ConcurrentHashMap;

    invoke-direct {v0}, Ljava/util/concurrent/ConcurrentHashMap;-><init>()V

    iput-object v0, p0, Les/qd0;->d:Ljava/util/Map;

    .line 3
    iput-wide p1, p0, Les/qd0;->b:J

    .line 4
    iput-object p3, p0, Les/qd0;->c:Lcom/hierynomus/smbj/connection/a;

    .line 5
    new-instance p1, Ljava/util/concurrent/ConcurrentHashMap;

    invoke-direct {p1}, Ljava/util/concurrent/ConcurrentHashMap;-><init>()V

    iput-object p1, p0, Les/qd0;->a:Ljava/util/Map;

    return-void
.end method


# virtual methods
.method public a()Lcom/hierynomus/smbj/connection/a;
    .locals 1

    .line 32
    iget-object v0, p0, Les/qd0;->c:Lcom/hierynomus/smbj/connection/a;

    return-object v0
.end method

.method public a(Ljava/lang/String;)Les/wd0;
    .locals 12

    .line 1
    iget-object v0, p0, Les/qd0;->c:Lcom/hierynomus/smbj/connection/a;

    invoke-virtual {v0}, Les/jd0;->e()Ljava/lang/String;

    move-result-object v0

    .line 2
    new-instance v8, Lcom/hierynomus/smbj/common/c;

    invoke-direct {v8, v0, p1}, Lcom/hierynomus/smbj/common/c;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    .line 3
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "Connection to "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    const-string v1, " on session:"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-wide v1, p0, Les/qd0;->b:J

    invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const-string v1, "SMB2"

    invoke-static {v1, v0}, Lcom/estrongs/android/util/n;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 4
    iget-object v0, p0, Les/qd0;->a:Ljava/util/Map;

    invoke-virtual {v8}, Lcom/hierynomus/smbj/common/c;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-interface {v0, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Les/wd0;

    if-eqz v0, :cond_0

    .line 5
    invoke-virtual {v0}, Les/wd0;->c()Z

    move-result v2

    if-eqz v2, :cond_0

    .line 6
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string p1, " share from cached!"

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-static {v1, p1}, Lcom/estrongs/android/util/n;->b(Ljava/lang/String;Ljava/lang/String;)V

    return-object v0

    .line 7
    :cond_0
    :try_start_0
    new-instance v0, Lcom/hierynomus/smbj/smb2/messages/p;

    iget-object v1, p0, Les/qd0;->c:Lcom/hierynomus/smbj/connection/a;

    .line 8
    invoke-virtual {v1}, Lcom/hierynomus/smbj/connection/a;->i()Lcom/hierynomus/smbj/smb2/SMB2Dialect;

    move-result-object v1

    iget-wide v2, p0, Les/qd0;->b:J

    invoke-direct {v0, v1, v8, v2, v3}, Lcom/hierynomus/smbj/smb2/messages/p;-><init>(Lcom/hierynomus/smbj/smb2/SMB2Dialect;Lcom/hierynomus/smbj/common/c;J)V

    .line 9
    invoke-virtual {v0}, Lcom/hierynomus/smbj/smb2/d;->a()Lcom/hierynomus/smbj/smb2/c;

    move-result-object v1

    const/16 v2, 0x100

    invoke-virtual {v1, v2}, Lcom/hierynomus/smbj/smb2/c;->b(I)V

    .line 10
    iget-object v1, p0, Les/qd0;->c:Lcom/hierynomus/smbj/connection/a;

    invoke-virtual {v1, v0}, Lcom/hierynomus/smbj/connection/a;->b(Lcom/hierynomus/smbj/smb2/d;)Ljava/util/concurrent/Future;

    move-result-object v0

    .line 11
    sget-object v1, Lcom/hierynomus/smbj/transport/TransportException;->Wrapper:Les/fd0;

    invoke-static {v0, v1}, Les/gd0;->a(Ljava/util/concurrent/Future;Les/fd0;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/hierynomus/smbj/smb2/messages/q;

    .line 12
    invoke-virtual {v0}, Lcom/hierynomus/smbj/smb2/d;->a()Lcom/hierynomus/smbj/smb2/c;

    move-result-object v1

    invoke-virtual {v1}, Lcom/hierynomus/smbj/smb2/c;->f()Lcom/hierynomus/mserref/NtStatus;

    move-result-object v1

    invoke-virtual {v1}, Lcom/hierynomus/mserref/NtStatus;->isError()Z

    move-result v1

    if-nez v1, :cond_5

    .line 13
    invoke-virtual {v0}, Lcom/hierynomus/smbj/smb2/messages/q;->c()Ljava/util/EnumSet;

    move-result-object v1

    sget-object v2, Lcom/hierynomus/smbj/smb2/SMB2ShareCapabilities;->SMB2_SHARE_CAP_ASYMMETRIC:Lcom/hierynomus/smbj/smb2/SMB2ShareCapabilities;

    invoke-virtual {v1, v2}, Ljava/util/EnumSet;->contains(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_4

    .line 14
    invoke-virtual {v0}, Lcom/hierynomus/smbj/smb2/d;->a()Lcom/hierynomus/smbj/smb2/c;

    move-result-object v1

    invoke-virtual {v1}, Lcom/hierynomus/smbj/smb2/c;->g()J

    move-result-wide v9

    .line 15
    new-instance v11, Les/xd0;

    invoke-virtual {v0}, Lcom/hierynomus/smbj/smb2/messages/q;->c()Ljava/util/EnumSet;

    move-result-object v6

    iget-object v7, p0, Les/qd0;->c:Lcom/hierynomus/smbj/connection/a;

    move-object v1, v11

    move-wide v2, v9

    move-object v4, v8

    move-object v5, p0

    invoke-direct/range {v1 .. v7}, Les/xd0;-><init>(JLcom/hierynomus/smbj/common/c;Les/qd0;Ljava/util/EnumSet;Lcom/hierynomus/smbj/connection/a;)V

    .line 16
    iget-object v1, p0, Les/qd0;->d:Ljava/util/Map;

    invoke-static {v9, v10}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v2

    invoke-interface {v1, v2, v11}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 17
    invoke-virtual {v0}, Lcom/hierynomus/smbj/smb2/messages/q;->d()Z

    move-result v1

    if-eqz v1, :cond_1

    .line 18
    new-instance v0, Les/sd0;

    invoke-direct {v0, v8, v11}, Les/sd0;-><init>(Lcom/hierynomus/smbj/common/c;Les/xd0;)V

    goto :goto_0

    .line 19
    :cond_1
    invoke-virtual {v0}, Lcom/hierynomus/smbj/smb2/messages/q;->e()Z

    move-result v1

    if-eqz v1, :cond_2

    .line 20
    new-instance v0, Les/ud0;

    invoke-direct {v0, v8, v11}, Les/ud0;-><init>(Lcom/hierynomus/smbj/common/c;Les/xd0;)V

    goto :goto_0

    .line 21
    :cond_2
    invoke-virtual {v0}, Lcom/hierynomus/smbj/smb2/messages/q;->f()Z

    move-result v0

    if-eqz v0, :cond_3

    .line 22
    new-instance v0, Les/vd0;

    invoke-direct {v0, v8, v11}, Les/vd0;-><init>(Lcom/hierynomus/smbj/common/c;Les/xd0;)V

    .line 23
    :goto_0
    iget-object v1, p0, Les/qd0;->a:Ljava/util/Map;

    invoke-interface {v1, p1, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    return-object v0

    .line 24
    :cond_3
    new-instance p1, Lcom/hierynomus/smbj/common/SMBRuntimeException;

    const-string v0, "Unknown ShareType returned in the TREE_CONNECT Response"

    invoke-direct {p1, v0}, Lcom/hierynomus/smbj/common/SMBRuntimeException;-><init>(Ljava/lang/String;)V

    throw p1

    .line 25
    :cond_4
    new-instance p1, Lcom/hierynomus/smbj/common/SMBRuntimeException;

    const-string v0, "ASYMMETRIC capability unsupported"

    invoke-direct {p1, v0}, Lcom/hierynomus/smbj/common/SMBRuntimeException;-><init>(Ljava/lang/String;)V

    throw p1

    .line 26
    :cond_5
    new-instance p1, Lcom/hierynomus/smbj/common/SMBApiException;

    invoke-virtual {v0}, Lcom/hierynomus/smbj/smb2/d;->a()Lcom/hierynomus/smbj/smb2/c;

    move-result-object v0

    invoke-virtual {v0}, Lcom/hierynomus/smbj/smb2/c;->f()Lcom/hierynomus/mserref/NtStatus;

    move-result-object v0

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Could not connect to "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {p1, v0, v1}, Lcom/hierynomus/smbj/common/SMBApiException;-><init>(Lcom/hierynomus/mserref/NtStatus;Ljava/lang/String;)V

    throw p1
    :try_end_0
    .catch Lcom/hierynomus/smbj/transport/TransportException; {:try_start_0 .. :try_end_0} :catch_0

    :catch_0
    move-exception p1

    .line 27
    new-instance v0, Lcom/hierynomus/smbj/common/SMBRuntimeException;

    invoke-direct {v0, p1}, Lcom/hierynomus/smbj/common/SMBRuntimeException;-><init>(Ljava/lang/Throwable;)V

    throw v0
.end method

.method public a(JJLcom/hierynomus/smbj/common/c;)V
    .locals 3

    .line 28
    iget-wide v0, p0, Les/qd0;->b:J

    cmp-long v2, v0, p1

    if-nez v2, :cond_0

    .line 29
    new-instance p1, Ljava/lang/StringBuilder;

    invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V

    const-string p2, "Notified of TreeDisconnected <<"

    invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1, p5}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    const-string p2, ">>"

    invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    const-string p2, "SMB2"

    invoke-static {p2, p1}, Lcom/estrongs/android/util/n;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 30
    iget-object p1, p0, Les/qd0;->d:Ljava/util/Map;

    invoke-static {p3, p4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object p2

    invoke-interface {p1, p2}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    if-eqz p5, :cond_0

    .line 31
    iget-object p1, p0, Les/qd0;->a:Ljava/util/Map;

    invoke-virtual {p5}, Lcom/hierynomus/smbj/common/c;->toString()Ljava/lang/String;

    move-result-object p2

    invoke-interface {p1, p2}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    :cond_0
    return-void
.end method

.method public b()J
    .locals 2

    .line 1
    iget-wide v0, p0, Les/qd0;->b:J

    return-wide v0
.end method
